<style>    
    #testFileInput2{
        height: 30px; width: 102px; margin-left: 128px;
    }
    #preview1, #topPhpto
        {  
            width:150px;  
            padding-left: 65px;padding-top: 15px; border-top-width: 5px;
            //height:150px;  
        }
</style>
<div class="pageContent">	
    <form method="post" action="__CONTROLLER__/edit?callbackType=closeCurrent" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
        <input type="hidden"  id='hidden'  name='id' value="<{$newInfo.id}>"/>
        <input type="hidden" name="icon"    value="" id="icon">
        <div class="pageFormContent" layoutH="58">
            <div class="unit">
                <label>标题：</label>
                <input type="text" name="title" size="25"  value="<{$newInfo.title}>" id="titles" class='required' />
            </div>
            <div class="unit">
                <label>来源：</label>
                <input type="text" name="fromWhere" size="25"  value="<{$newInfo.fromwhere}>"  />
               
            </div>
            
            <div class="unit" id='control'>
                <label>作者：</label>
                <input type="text"  name="author" size="25" value="<{$newInfo.author }>" />
            </div>
            <neq name="newInfo['contenturl']" value=''>
                <div class="unit" id='control'>
                    <label>链接：</label>
                    <input type="text"  name="contentUrl" size="25" value="<{$newInfo.contenturl}>" readonly/>
                </div> 
            </neq>
            <div id="preview1" href=""><img src="<{$Think.const.PUBLIC_URL}>upload/<{$newInfo.icon}>" id='topPhpto'/></div>
            <div class="unit">
                <label>图片：</label>  
                <input id="testFileInput2" type="file" name="images"                                        
                    uploaderOption="{
			swf:'<{$Think.const.DWZ_URL}>uploadify/scripts/uploadify.swf',
			uploader:'__CONTROLLER__/newUp',
                        formData:{authId:<?php echo $_SESSION['authId'];?>, ajax:1},
			buttonText:'请选择文件',
			fileSizeLimit:'20000KB',
			fileTypeDesc:'*.jpg;*.jpeg;*.gif;*.png;',
			fileTypeExts:'*.jpg;*.jpeg;*.gif;*.png;',
			auto:true,
                        onUploadSuccess:function(file,data,respore){
                            $('#topPhpto').attr('src','<{$Think.const.PUBLIC_URL}>'+'upload/'+data);
                            $('#icon').val(data);
                        }
                    }"
                />
            </div>
            <div class="unit" id='control'>
                <label>内容：</label>  
                <!--<input type="text"  name="description" size="25" value="<{$newInfo.description}>" />-->
                
               <textarea class="editor" name="description" rows="23" cols="100"
                    upLinkUrl="<{$Think.const.DWZ_URL}>xheditor/up/upload.php" upLinkExt="zip,rar,txt" 
                    upImgUrl="<{$Think.const.DWZ_URL}>xheditor/upload.php" upImgExt="jpg,jpeg,gif,png" 
                    upFlashUrl="<{$Think.const.DWZ_URL}>xheditor/upload.php" upFlashExt="swf"
                    upMediaUrl="<{$Think.const.DWZ_URL}>xheditor/upload.php" upMediaExt="mp4,mov,rmvb">
                    <{$newInfo.description}>
                </textarea>
            </div>
            <gt name="Think.session.type" value="1">
                <neq name="newInfo['id']" value=''>
                    <div class="unit">
                        <label style="width: 108px;">是否置顶：</label>
                        <label style="width: 38px;"><input type="radio" name="top" value="1" />是</label>
                        <label><input type="radio" name="top" value='0' checked/>否</label> 
                    </div>
                </neq>
            </gt>
        </div>
        <div class="formBar">
            <ul>
                <eq name="sign" value="1">
                    <li><div class="buttonActive"><div class="buttonContent"><button type="button" id='tuisong'>推送</button></div></div></li>
                </eq>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
            </ul>
        </div>
    </form>	
</div>
<script>
    $("#tuisong").click(function(){
        var contentUrl =$("input[name='contentUrl']").val();
        var type    =4;
        var title   =$("#titles").val();
        var new_id  =$("input[name='id']").val();
        $.post("__MODULE__/Message/edit",{jurl:contentUrl,type:type,content:title,new_id:new_id},function(data){              
            alert(data['message']);
        });
    });
</script>

